package b3.widget.basic
{
	import flash.display.*;

	public class SpriteDigit extends BasicWidget
	{
		private var container:Sprite;
		private var _digit:int;
		
		public function SpriteDigit(digit:int, FontClass:Class)
		{
			super();
			container = new FontClass();
			addChild(container);
			for (var i:int = 0; i < container.numChildren; i++)
				container.getChildAt(i).visible = false;
			this.digit = digit;
			this.mouseChildren = false;
			this.mouseEnabled = false;
		}
		
		public function set digit(d:int):void
		{
			container.getChildAt(_digit).visible = false;
			_digit = d;
			container.getChildAt(_digit).visible = true;
		}
		
	}
}